import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ProductAttribute } from 'src/app/model/productAttr';

@Component({
  selector: 'app-product-attr-editer',
  templateUrl: './product-attr-editer.component.html',
  styleUrls: ['./product-attr-editer.component.less']
})
export class ProductAttrEditerComponent implements OnInit {

  productAttr: ProductAttribute
  constructor(
    private route: ActivatedRoute,
  ) { }

  ngOnInit(): void {
    this.route.data.subscribe(
      (data:{attr: ProductAttribute}) => this.productAttr = data.attr,
    )
  }

}
